package br.com.locanet.dao;

import java.util.List;

import javax.persistence.PersistenceException;

import br.com.locanet.bean.IEntity;

public interface DAO<ENTITY extends IEntity> {
   public ENTITY insert(ENTITY entity)throws PersistenceException;
   public ENTITY update(ENTITY entity)throws PersistenceException;
   public void delete(ENTITY entity)throws PersistenceException;
   public ENTITY findById(ENTITY entity) throws PersistenceException;
   public List<ENTITY> find(String queryName,Object[] args)throws PersistenceException;
   public List<ENTITY> findAll() throws PersistenceException;
   public List<ENTITY> findNavite(String queryName) throws PersistenceException;
   public List<ENTITY> findNavite(String queryName,Object[] args) throws PersistenceException;
   public List<ENTITY> findByNamedQuery(String queryName,Object[]args) throws PersistenceException;
}
